package cn.wolfcode.shop.api.domain;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Setter@Getter
public class OrderAction extends BaseDomain{

    public static final int ORDER_NORMAL = 0;//未确认
    public static final int ORDER_CONFIRM = 1;//已确认
    public static final int ORDER_FINISH = 2;//已完成

    public static final int SHOP_NORMAL = 0;//未发货
    public static final int SHOP_CONFIRM = 1;//已发货
    public static final int SHOP_FINISH = 2;//已收货

    public static final int PAY_NORMAL = 0;//未支付
    public static final int PAY_CONFIRM = 1;//已支付

    private Long orderId;

    private String actionUser;

    private Byte orderStatus;

    private Byte shippingStatus;

    private Byte payStatus;

    private Byte actionPlace;

    private String actionNote;

    private Date actionTime;

    public String getOrderStatusDisplay(){
        switch (orderStatus){
            case ORDER_NORMAL : return "未确认";
            case ORDER_CONFIRM : return "已确认";
            case ORDER_FINISH : return "已完成";
            default: return "";
        }
    }
    public String getShippingStatusDisplay(){
        switch (shippingStatus){
            case SHOP_NORMAL : return "未发货";
            case SHOP_CONFIRM : return "已发货";
            case SHOP_FINISH : return "已收货";
            default: return "";
        }
    }
    public String getPayStatusDisplay(){
        switch (payStatus){
            case PAY_NORMAL : return "未支付";
            case PAY_CONFIRM : return "已支付";
            default: return "";
        }
    }
}